package com.itheima.stock.mapper;

import com.itheima.stock.common.domain.Stock4EvrDayDomain;
import com.itheima.stock.common.domain.Stock4MinuteDomain;
import com.itheima.stock.common.domain.StockUpdownDomain;
import com.itheima.stock.pojo.StockRtInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @Entity com.itheima.stock.pojo.StockRtInfo
 */
@Mapper
public interface StockRtInfoMapper {

    int deleteByPrimaryKey(Long id);

    int insert(StockRtInfo record);

    int insertSelective(StockRtInfo record);

    StockRtInfo selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(StockRtInfo record);

    int updateByPrimaryKey(StockRtInfo record);

    List<StockUpdownDomain> getStockRtInfoLimit(@Param("timePoint") Date timePoint);

    List<StockUpdownDomain> stockPage();

    List<Map> getupDownCount(@Param("opendate") Date opendate,
                             @Param("closedate") Date closedate,
                             @Param("i") int i);

    List<Map> stockUpDownScopeCount(@Param("date1") Date date1);

    List<Stock4MinuteDomain> stockScreenTimeSharing(@Param("code") String code, @Param("openDate") Date openDate, @Param("date1") Date date);

    List<Stock4EvrDayDomain> getDayKLinData(@Param("code") String code, @Param("endTime") Date endTime, @Param("starTime") Date starTime);

    List <String> chaofenlj(@Param("code") String code, @Param("endTime") Date endTime, @Param("starTime") Date starTime);

    List<Stock4EvrDayDomain> getDayKLinData2(@Param("chaofenlj") List<String> chaofenlj, @Param("code") String code);

    /**
     * 批量插入股票的实时详情信息
     * @param info
     */
    void insertBatch(@Param("stockRtInfos") List<StockRtInfo> info);

}




